package com.ruoyi.dynamic.model.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.pojo.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Objects;


/**
 * <p>
 * 房间心动交友记录
 * </p>
 *
 * @author ${author}
 * @since 2024-12-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("youban_room_heart_record")
@Schema(description = "房间心动交友记录")
public class RoomHeartRecord extends BaseEntity<RoomHeartRecord> {

    @Schema(description = "房间id")
    private Long roomId;

    @Schema(description = "介绍文案")
    private String content;

    @Schema(description = "心动交友记录id")
    private Long roomHeartId;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "对方用户id")
    private Long aimUserId;

    @Schema(description = "0匹配失败1匹配成功")
    private Integer status;

    @Schema(description = "麦位")
    private Integer maiNum;

    @Schema(description = "用户名称")
    private String userName;

    @Schema(description = "用户头像")
    private String userPhoto;

    @Schema(description = "对方用户名称")
    private String aimUserName;

    @Schema(description = "对方用户头像")
    private String aimUserPhoto;

    @Schema(description = "对方麦位")
    private Integer aimMaiNum;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass()!= o.getClass()) return false;
        RoomHeartRecord that = (RoomHeartRecord) o;
        return (Objects.equals(this.userId, that.userId) && Objects.equals(this.aimUserId, that.aimUserId))
                || (Objects.equals(this.userId, that.aimUserId) && Objects.equals(this.aimUserId, that.userId));
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId, aimUserId);
    }

}
